"use strict";

module.exports = {
  keys: "DJ",

  middleware: ["auth"],

  swaggerdoc: {
    dirScanner: "./app/controller",
    apiInfo: {
      title: "DJ博客API文档",
      description: "DJ博客API文档",
      version: "1.1.0",
    },
    schemes: ["http", "https"],
    consumes: ["application/json"],
    produces: ["application/json"],
    securityDefinitions: {
      apikey: {
        type: "apiKey",
        name: "Authorization",
        in: "header",
      },
    },
    enableSecurity: true,
    enable: true,
  },

  sequelize: {
    dialect: "mysql",
    host: "localhost",
    port: 3306,
    database: "dj_blog",
    username: "root",
    password: "dj123456",
    timezone: "+08:00",
  },

  jwt: {
    secret: "dj", // 自定义 token 加密条件字符串
  },

  cors: {
    origin: "*",
    allowMethods: "GET,HEAD,PUT,POST,DELETE,PATCH",
  },

  whiteList: ["swagger", "/api/login", "/api/web", "/public"],
};
